Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: LotusScript COM: Open NotesDocument in UI
Feedback Type: Question
Product Area: Database
Technical Area: Application Development
Platform: Windows
Release: 8.5
Reproducible: Always

I am working on coexistence between Microsoft Outlook and IBM Lotus Notes.

Outlook Items = Notes Documents

I am adding context menu's in Outlook where a user clicks any Item in MS Outlook would display a "Open Document" option. I have everything working to the point where I need to display the document in Lotus Notes.

I can open Notes databases through COM, got to a view and highlight a document. But I cannot figure out a way to open the document through COM.

The code below shows how I'm doing this and it errors out at NotesUIWorkspace.EditDocument(LNdoc) line.

I tried returning to a NotesUIDocument, that errors out, I tried all combinations of input parameters to EditDocument(boolvalue, doc, boolvalue).

Is there an alternative solution to open a document through com?

Public Sub OpenLNDatabase(servername As String, dbname As String, docID As String, docKey As String)

Dim ws As Object '(NotesUIWorkSpace)
Dim cLotusNotes As New clsLotusNotes
Dim LNDb As NotesDatabase
Dim LNdoc as NotesDocument
Dim LNSession as new NotesSession

If (servername = "" Or dbname = "") Then
MsgBox "I am not configured to open this Lotus Notes database. Please contact support", vbCritical, Title
Exit Sub
End If

Set LNSession = New NotesSession
Call cLotusNotes.session.Initialize

Set ws = CreateObject("Notes.NotesUIWorkspace")

Set LNDb = LNSession.GetDatabase(servername, dbname)

If (docID = "" And docKey = "") Then
'THIS WORKS
Call ws.OpenDatabase(servername, dbname, "", "", "")
Else
'open document in database by docuid
If (docID <> "") Then
Set LNDoc = LNDb.GetDocumentByUNID(docID) 'works
Call ws.EDITDOCUMENT(LNDoc) 'automation error

Else
If (docKey <> "") Then
'search a view for a field value
'to get a handle to a notesdocument.
End If
End If

End If

Set ws = Nothing

End Sub


Feedback number WEBB89ZM6B created by ~Autumn Zenfanagen on 10/07/2010

Status: Open
Comments:

LotusScript COM: Open NotesDocument... (~Autumn Zenfana... 7.Oct.10)
. . Use NotesURL (~Yentl Ektootex... 11.Oct.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS